/**
 * 
 */
package com.suyx.job.service.area.impl;

import org.springframework.stereotype.Service;

import com.suyx.job.entity.RoleInfo;
import com.suyx.job.entity.TuInfo;
import com.suyx.job.enums.SectEnums;
import com.suyx.job.utils.ScreenCapture;

/**
 * @author syx
 *
 */
@Service
public class GoToCa4AreaServiceImpl extends AbstractAreaService{

	
	@Override
	public boolean execute(String device, String path, String area) {
		try {
			String[] info =  area.split("#");
			String[] q_info = info[3].split("&");
			ScreenCapture.mouseClick(device, "1308 675");//  # 打开包裹
			ScreenCapture.mouseClick(device, "892 312");// 打开 2-3
			ScreenCapture.mouseClick(device, "522 422");// 使用
			ScreenCapture.mouseClick(device, q_info[0]+" "+q_info[1]);
			ScreenCapture.mouseClick(device, "1156 52");// 关闭包裹
			
			Thread.sleep(2 * 1000L);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		return false;
	}

	@Override
	public boolean support(String area) {
		return SectEnums.CA4.getCode().equals(area);
	}

	@Override
	public boolean goToPoint(RoleInfo roleInfo, String path, TuInfo tuInfo) {
		
		return false;
	}
	
}
